<#include "/flt/include/_layout.html"/>
<#macro customScript>
	var listData = ${queryFieldList};
	$('#editTable').dataTable({ 
		data: listData,
		columns: [
	        { data: 'queryKey' },
	        { data: 'showName' },
	        { data: 'dataType' },
	        { data: 'ruleId',render:transNull },
	        { data: 'id',render : function(data,type, row, meta) {
	        	var content = '<a class="btn btn-info" href="${ctx}/config/queryField/edit/'+data+'"><i class="halflings-icon white edit"></i></a>';
	        	content += '   <a class="btn btn-danger" href="${ctx}/config/queryField/delete/'+data+'"><i class="halflings-icon white trash"></i></a>';
	        	return content;
	        },className:'center'}
    	],searching: false,ordering:false
	});
	function transNull(data){
		if(data) return data;else return "";
	}
</#macro>
<!--传入左侧展开点的值-->
<@layout clickA="configPage" scriptInfo=customScript>
<ul class="breadcrumb">
	<li>
		<i class="icon-home"></i>
		<a href="${ctx}/config">配置界面</a> 
		<i class="icon-angle-right"></i>
	</li>
	<li><a href="#">编辑</a></li>
</ul>

<div class="row-fluid sortable">
	<div class="box span12">
		<div class="box-header" data-original-title>
			<h2><i class="halflings-icon edit"></i><span class="break"></span>Form 字段编辑</h2>
			<div class="box-icon">
				<a href="#" class="btn-setting"><i class="halflings-icon wrench"></i></a>
				<a href="#" class="btn-minimize"><i class="halflings-icon chevron-up"></i></a>
			</div>
		</div>
		<div class="box-content">
			<div class="control-group">
					<p><a class="btn btn-small btn-info"><i class="halflings-icon plus white"></i>添加字段</a></p>
					<table class="table table-striped table-bordered bootstrap-datatable datatable" id="editTable">
					  <thead>
						  <tr>
							  <th>字段代码</th>
							  <th>字段名称</th>
							  <th>字段类别</th>
							  <th>转换规则</th>
							  <th>操作</th>
						  </tr>
					  </thead>   
					  <tbody>
					  </tbody>
				  </table>
			 </div>
			<form class="form-horizontal">
				<fieldset>
				  <div class="control-group">
					<label class="control-label" for="focusedInput">Focused input</label>
					<div class="controls">
					  <input class="input-xlarge focused" id="focusedInput" type="text" placeholder="请输入..">
					</div>
				  </div>
				  <div class="control-group">
					<label class="control-label">excel是否导出</label>
					<div>
					 <div class="controls">
					  <label class="radio"><input type="radio" name="optionsRadios" id="optionsRadios1" value="1" checked>是</label>
					  <label class="radio"><input type="radio" name="optionsRadios" id="optionsRadios2" value="0">否</label>
					 </div>
					</div>
				  </div>
				  <div class="control-group">
					<label class="control-label" for="selectError3">归类</label>
					<div class="controls">
					  <select id="selectError3">
						<option>司法数据</option>
						<option>其他</option>
					  </select>
					</div>
				  </div>
				  <div class="form-actions">
					<button type="submit" class="btn btn-primary">保存修改</button>
					<button class="btn">取消</button>
				  </div>
				</fieldset>
			  </form>
		
		</div>
	</div><!--/span-->
</div><!--/row-->
<div class="modal hide fade" id="editModal">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal">×</button>
		<h3>设置</h3>
	</div>
	<div class="modal-body">
		<p>这里可进行配置...</p>
	</div>
	<div class="modal-footer">
		<a href="#" class="btn" data-dismiss="modal">关闭</a>
		<a href="#" class="btn btn-primary">保存更改</a>
	</div>
</div>
		
<div class="clearfix"></div>
</@layout>
